GridC

A class that makes building GridBagConstraints objects easy, efficient and readable for layout out GUI elements using the GridBagLayout layout manager To use this, call GridC.getc() and then call any of the methods below on the result in order to set different attributes for the component that is being laid out. For example:

    JPanel p = new JPanel(new GridBagLayout());
    p.add(myLabel, GridC.getc(0,0).east());
    p.add(myField, GridC.getc(1,0).wx(1).fillx().colspan(2));
    p.add(myLabel2, GridC.getc(0,1).east());
    p.add(myField2, GridC.getc(1,1).wx(1).fillx());
    p.add(myButton2, GridC.getc(1,2));

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
val ABOVE_BASELINE: Int = 1024
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open var anchor: Int
Link copied to clipboard
val BASELINE: Int = 256
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val BELOW_BASELINE: Int = 1792
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val BOTH: Int = 1
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val CENTER: Int = 10
Link copied to clipboard
val EAST: Int = 13
Link copied to clipboard
open var fill: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open var gridheight: Int
Link copied to clipboard
open var gridwidth: Int
Link copied to clipboard
open var gridx: Int
Link copied to clipboard
open var gridy: Int
Link copied to clipboard
val HORIZONTAL: Int = 2
Link copied to clipboard
open var insets: Insets
Link copied to clipboard
open var ipadx: Int
Link copied to clipboard
open var ipady: Int
Link copied to clipboard
val LAST_LINE_END: Int = 26
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val LINE_END: Int = 22
Link copied to clipboard
val LINE_START: Int = 21
Link copied to clipboard
val NONE: Int = 0
Link copied to clipboard
val NORTH: Int = 11
Link copied to clipboard
val NORTHEAST: Int = 12
Link copied to clipboard
val NORTHWEST: Int = 18
Link copied to clipboard
val PAGE_END: Int = 20
Link copied to clipboard
val PAGE_START: Int = 19
Link copied to clipboard
val RELATIVE: Int = -1
Link copied to clipboard
val REMAINDER: Int = 0
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val SOUTH: Int = 15
Link copied to clipboard
val SOUTHEAST: Int = 14
Link copied to clipboard
val SOUTHWEST: Int = 16
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val VERTICAL: Int = 3
Link copied to clipboard
open var weightx: Double
Link copied to clipboard
open var weighty: Double
Link copied to clipboard
val WEST: Int = 17

Functions

Link copied to clipboard
open fun bottomInset(newBottomInset: Int): GridC
Set the bottom edge inset
Link copied to clipboard
open fun center(): GridC
Anchor the component to the center (the default)
Link copied to clipboard
open fun clone(): Any
Link copied to clipboard
open fun colspan(numColumns: Int): GridC
Set the gridwidth: number of columns to span.
Link copied to clipboard
open fun copy(): GridC
Return a clone of this object that can be stored for later use
Link copied to clipboard
open fun east(): GridC
Anchor the component to the east
Link copied to clipboard
open fun field(): GridC
Shortcut for the constraints associated with a field in a standard dialog
Link copied to clipboard
open fun fillboth(): GridC
Set the fill type to both horizontal and vertical
Link copied to clipboard
open fun fillnone(): GridC
Set the fill type to no filling (the default)
Link copied to clipboard
open fun fillx(): GridC
Set the fill type to horizontal
Link copied to clipboard
open fun filly(): GridC
Set the fill type to vertical
Link copied to clipboard
fun getc(): GridC
Reset and return the singleton GridC instance
fun getc(x: Int, y: Int): GridC
Reset and return the singleton GridC instance, with x and y initialized to the given values.
Link copied to clipboard
open fun inset(inset: Int): GridC
Set the top, left, bottom, and right insets to the given value
Link copied to clipboard
open fun insets(top: Int, left: Int, bottom: Int, right: Int): GridC
Set the insets
Link copied to clipboard
open fun label(): GridC
Shortcut for the settings associated with a label in a standard dialog
Link copied to clipboard
open fun leftInset(newLeftInset: Int): GridC
Set the left edge inset
Link copied to clipboard
open fun north(): GridC
Anchor the component to the north
Link copied to clipboard
open fun northEast(): GridC
Anchor the component to the northeast
Link copied to clipboard
open fun northWest(): GridC
Anchor the component to the northwest
Link copied to clipboard
open fun padx(xPadding: Int): GridC
Set the internal padding along the X axis
Link copied to clipboard
open fun pady(yPadding: Int): GridC
Set the internal padding along the Y axis
Link copied to clipboard
open fun reset(): GridC
Reset all of the constraints to the default value and return ourself.
Link copied to clipboard
open fun rightInset(newRightInset: Int): GridC
Set the right edge inset
Link copied to clipboard
open fun rowspan(numRows: Int): GridC
Set the gridheight: number of rows to span.
Link copied to clipboard
open fun sideInsets(sideInset: Int): GridC
Link copied to clipboard
open fun smallField(): GridC
Shortcut to get a west-aligned field that does not fill the available space but does have standard field insets
Link copied to clipboard
open fun south(): GridC
Anchor the component to the south
Link copied to clipboard
open fun southEast(): GridC
Anchor the component to the southeast
Link copied to clipboard
open fun southWest(): GridC
Anchor the component to the southwest
Link copied to clipboard
open fun topInset(newTopInset: Int): GridC
Set the top edge inset
Link copied to clipboard
open fun west(): GridC
Anchor the component to the west
Link copied to clipboard
open fun wx(xWeight: Float): GridC
Set our weightx value and return self
Link copied to clipboard
open fun wxy(xWeight: Float, yWeight: Float): GridC
Set our weightx and weighty value and return self
Link copied to clipboard
open fun wy(yWeight: Float): GridC
Set our weighty value and return self
Link copied to clipboard
open fun x(x: Int): GridC
Set our gridx value and return self
Link copied to clipboard
open fun xy(x: Int, y: Int): GridC
Set both the gridx and gridy values and return self
Link copied to clipboard
open fun y(y: Int): GridC
Set our gridx value and return self